package com.muyu.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import com.muyu.danmo.domain.DanmoInformationBar;
import com.muyu.danmo.domain.DanmoInformationBasic;
import com.muyu.danmo.domain.DanmoInformationCopy1;
import com.muyu.danmo.domain.DanmoInformationPhotos;
import com.muyu.common.core.enums.PayMethod;
import com.muyu.system.enums.PriceUpdateTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 书画市场商品信息对象 danmo_market_products
 *
 * @author yangle
 * @date 2024-09-07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class  DanmoMarketProducts extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    private Long id;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String productName;

    /**
     * 商品描述
     */
    @Excel(name = "商品描述")
    private String description;
    /**
     * 浏览量
     */
    @Excel(name = "浏览量")
    private Long views;
    /**
     *用户信息id
     */
    @Excel(name = "用户信息id")
    private Long informationId;

    /**
     * 价格
     */
    @Excel(name = "价格")
    private BigDecimal price;
    /**
     * 现价格
     */
    @Excel(name = "原价格")
    private BigDecimal currentPrice;

    /**
     * 商品类型
     */
    @Excel(name = "商品类型")
    private Long marketType;

    /**
     * 库存数量
     */
    @Excel(name = "库存数量")
    private Long stockQuantity;

    @Excel(name = "商品图片")
    private String picture;


    @Excel(name = "商品状态 （1. 上架中 2.已下架 3.已售出）")
    private Long marketState;

    @Excel(name = "用户id")
    private Long userId;

    @Excel(name = "状态")
    private int status = 0;
    /**
     * 作者姓名
     */
    private String authorName;

    /**
     * 省份名称
     */
    private String provinceName;

    /**
     * 市名称
     */
    private String cityName;
    /**
     * 头像
     */
    private String avatar;

    /**
     * 是否包邮
     */
    private String isPosExpress;

    /**
     * 省份代码
     */
    private String provinceCode;

    /**
     * 市代码
     */
    private String cityCode;

    /**
     * 地址ID
     */
    private Long addressId;

    /**
     * 是否收藏
     */
    private String isCollection;

    /**
     * 书画市场类型图片信息
     */
    private List<DanmoMarketPicture> danmoMarketPictureList;
    /**
     * 书画市场类型信息
     */
    private List<DanmoMarketTypes> danmoMarketTypesList;

    /**
     * 书画市场印章信息
     */
    private List<DanmoMarketSeal> danmoMarketSealList;

    /**
     * 数量
     */
    private Integer num;

    /**
     * 个人简介
     */
    private String profile;


    /**
     * 排序字段   desc 降  asc 升
     */
    @TableField(exist = false)
    private String orderByColumn;
    @TableField(exist = false)
    private Integer pageNum = 1;
    @TableField(exist = false)
    private Integer pageSize = 10;


    /**
     * 个人信息头像
     */
    @TableField(exist = false)
    private List<DanmoInformationPhotos> danmoInformationPhotosList;
    /**
     * 个人信息名称
     */
    @TableField(exist = false)
    private DanmoInformationBar danmoInformationBar;
    @TableField(exist = false)
    private DanmoInformationCopy1 danmoInformationCopy1;

    /**
     * 个人基本信息
     * @return
     */
    @TableField(exist = false)
    private DanmoInformationBasic danmoInformationBasic;


    /**
     * 个人信息头像
     */
    @TableField(exist = false)
    private DanmoInformationPhotos danmoInformationPhotos;


    /**
     *
     * 收藏人数
     * @return
     */
    private Integer collectionNumber;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("productName", getProductName())
                .append("description", getDescription())
                .append("price", getPrice())
                .append("informationId", getInformationId())
                .append("marketType", getMarketType())
                .append("stockQuantity", getStockQuantity())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("userId", getUserId())
                .toString();
    }
    /**
     * 支付方式
     */
    private PayMethod paymentMethod;


    /**
     * 手机号
     */
    private Long tel;

    /**
     * 卖家用户id
     */
    private Long sellerUserId;


    /**
     * 降价时间
     */
    private LocalDateTime cutPricesTime;
    /**
     * 抬价时间
     */
    private LocalDateTime addPricesTime;


    /**
     * 价格修改类型  1 降价  2 抬价
     */
    private PriceUpdateTypeEnum priceUpdateType;
}
